package com.pinghua.mocha.basics.enumerate.smart;

import com.coffee.core.CoffeeEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yangziyang
 * @since 2025/3/26
 */
public interface BarrelEnum {

    @Getter
    @AllArgsConstructor
    enum ApplyType implements CoffeeEnum<Integer> {
        PUT(10, "放桶"),
        RECOVERY(20, "回收"),
        CHANGE(30, "换桶");

        @JsonValue
        private final Integer code;

        private final String label;

        @Override
        public Integer code() {
            return this.code;
        }

        @Override
        public String label() {
            return this.label;
        }
    }

    @Getter
    @AllArgsConstructor
    enum ApplyPutType implements CoffeeEnum<Integer> {
        PURCHASE(10, "购买"),
        DEPOSIT(20, "押金"),
        DONATE(30, "赠送");

        @JsonValue
        private final Integer code;

        private final String label;

        @Override
        public Integer code() {
            return this.code;
        }

        @Override
        public String label() {
            return this.label;
        }
    }

    @Getter
    @AllArgsConstructor
    enum HandleStatus implements CoffeeEnum<Integer> {
        PENDING(10, "待处理"),
        HANDLED(20, "已处理");

        @JsonValue
        private final Integer code;

        private final String label;

        @Override
        public Integer code() {
            return this.code;
        }

        @Override
        public String label() {
            return this.label;
        }
    }
}
